/**
 * FlashHeaderResponse.java
 * All rights reserved, Copyright (C) 2008 XPEC
 */
package com.xpec.cipher.tals.record;

import org.jboss.netty.buffer.ChannelBuffer;
import org.jboss.netty.buffer.ChannelBuffers;

import com.xpec.cipher.tals.TalsConstance;

/**
 * @author Francois XPEC
 */
public class FlashHeaderResponseRecord extends TalsRecord {
	private final static byte[] RESPONSE = "<cross-domain-policy><allow-access-from domain=\"*\" to-ports=\"*\"/></cross-domain-policy>\0"
			.getBytes();
	

	@Override
	protected int getContentLength() {
		return RESPONSE.length;
	}

	@Override
	protected byte getContentType() {
		return TalsConstance.CONTENT_TYPE_FLASH_RESPONSE;
	}

	@Override
	protected ChannelBuffer resolveSubStruct() {
		return ChannelBuffers.wrappedBuffer(RESPONSE);
	}
}
